home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2010 Summer - Disc 1 / WN_Ete2010_CD1.iso / Onglet5 / Weezo / Weezo setup.exe / {code_appDir} / www / themes / themePreview.php < prev    next >
PHP Script  |  2010-05-19  |  3KB  |  61 lines

  1. <?php
  2. /**
  3.  * Theme preview / test
  4.  *
  5.  * PHP version 5
  6.  *
  7.  * LICENSE: This source file is subject to version 3.0 of the PHP license
  8.  * that is available through the world-wide-web at the following URI:
  9.  * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
  10.  * the PHP License and are unable to obtain it through the web, please
  11.  * send a note to license@php.net so we can mail you a copy immediately.
  12.  *
  13.  * @category   NA
  14.  * @package    NA
  15.  * @author     Nicolas Bruley / Peer 2 World <contact@weezo.net>
  16.  * @copyright  2005-2009 Nicolas Bruley / Peer 2 World
  17.  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  18.  * @version    CVS: $Id:$
  19.  * @link       http://www.weezo.net
  20.  * @since      File available since Release 1.0.0
  21.  */
  22.  
  23.  
  24. //#############################################################################################################
  25. // If user logged-in, display both frames
  26. //#############################################################################################################
  27. cfInsertBasicHEAD(false);
  28. echo '<meta title="'.cfCaption('configDefaultTheme').'">'."\n";
  29. echo '<link rel="shortcut icon" href="favicon.ico"></head>'."\n";
  30.  
  31.  
  32. if(isset($_GET['theme']) && $_GET['theme']!='noTheme') $t=$_GET['theme'];
  33. // Get theme information for main panel position
  34. else $t=cfActualTheme();
  35.  
  36.  
  37. $themeDirectory=cfAppDocRoot()."/themes/".$t;
  38. if(file_exists($themeDirectory.'/menu.php')) require_once($themeDirectory.'/menu.php'); else require_once('common/menu.php');
  39.  
  40. if(isset($theme['menuFrame']['position']) && in_array($theme['menuFrame']['position'],array('top','left','bottom','right')) && isset($theme['menuFrame']['size'])){
  41.     switch ($theme['menuFrame']['position']){
  42.         case 'top': echo '<frameset rows="'.$theme['menuFrame']['size'].',*" frameborder=no framespacing="0" border="0">';break;
  43.         case 'bottom': echo '<frameset rows="*,'.$theme['menuFrame']['size'].'" frameborder=no framespacing="0" border="0">';break;
  44.         case 'right': echo '<frameset cols="*,'.$theme['menuFrame']['size'].'" frameborder=no framespacing="0" border="0">';break;
  45.         case 'left': echo '<frameset cols="'.$theme['menuFrame']['size'].',*" frameborder=no framespacing="0" border="0">';break;
  46.     }
  47. }
  48. else {
  49.     require_once('outputFunctions.php');
  50.     outDisplayErrorPage(cfcaption('errorResourceFileIncorrect'));
  51. }
  52.  
  53. if($theme['menuFrame']['position']=='left' || $theme['menuFrame']['position']=='top') echo '<frame src="themePreviewMenu.php?theme='.urlencode($t).'" name="menuFrame" frameborder=yes border=1 noresize scrolling="'.$theme['menuFrame']['scrolling'].'">'."\n";
  54.  
  55. echo '<frame src="themePreviewBody.php?theme='.urlencode($t).'" name="mainFrame" frameborder=no border=0 noresize scrolling="auto">';
  56.  
  57. if($theme['menuFrame']['position']=='right' || $theme['menuFrame']['position']=='bottom') echo '<frame src="themePreviewMenu.php?theme='.urlencode($t).'" name="menuFrame" frameborder=yes border=1 noresize scrolling="'.$theme['menuFrame']['scrolling'].'">'."\n";
  58. ?>
  59. </frameset>
  60. <HTML>
  61.